package cn.dwy2002.binaryhandwritingserver.pojo.vo;

import cn.dwy2002.binaryhandwritingserver.pojo.base.BaseDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDate;

/**
 * 项目信息返回类
 *
 * @author 杜伟毅
 * @version 1.0
 * @since 2025/05/31
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class ProjectVO extends BaseDateTime {
    /**
     * 项目名称
     */
    private String name;
    /**
     * 项目描述
     */
    private String description;
    /**
     * 项目日期（年月），格式为 "YYYY-MM"
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8", shape = JsonFormat.Shape.STRING)
    @JsonDeserialize(using = LocalDateDeserializer.class)        // 反序列化
    @JsonSerialize(using = LocalDateSerializer.class)        // 序列化
    private LocalDate date;
    /**
     * 封面图URL
     */
    private String image;
    /**
     * Git地址
     */
    private String gitUrl;
    /**
     * Git地址
     */
    private String onlineUrl;
}
